package at.fhj.itm09.snake.logic;

/**
 * @author Susanne Brandstätter - Susanne.Brandstaetter.ITM09@fh-joanneum.at
 * @author Katharina Biela - Katharina.Biela.ITM09@fh-joanneum.at
 *
 * A simple class which contains the information where the snake is.
 * It also contains a comparison function, to check if the new coordinate
 * is the same as the old one.
 * 
 */
public class Coordinate {
    public int x;
    public int y;

    public Coordinate(int newX, int newY) {
        x = newX;
        y = newY;
    }

    public boolean equals(Coordinate newCoordinate) {
        if (x == newCoordinate.x && y == newCoordinate.y) {
            return true;
        }
        return false;
    }

    @Override
    public String toString() {
        return "Coordinate: [" + x + "," + y + "]";
    }
}
